<template>
  <el-table class="table" :data="data" border stripe highlight-current-row >
    <slot name="expand"></slot>
    <el-table-column
      label="#"
      type="index"
      width="60px"
    >
      <template slot-scope="scope">
        {{scope.$index+1}}
      </template>
    </el-table-column>
    <el-table-column v-for="(col,index) in columns"
      :prop="col.prop"
      :key="index"
      :label="col.label"
      :width="col.width">
    </el-table-column>
    <slot name="date"></slot>
    <slot name="isPay"></slot>
    <slot name="operate"></slot>
  </el-table>

</template>

<script>
export default {
  name: 'Table',
  props: {
    data: Array,
    columns: Array
  }
}
</script>

<style lang="less" scoped>
</style>
